// components/order-detail-header/OrderDetailHeader.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    flag: {
      type: Boolean,
      value: ''
    },
    orderStatus: {
      type: String,
      value: ''
    },
    communityObj: {
      type: Object,
      value: ''
    },
    userAddress: {
      type: Object,
      value: ''
    },
    groupLeader: {
      type: Object,
      value: ''
    },
    orderInfo: {
      type: Object,
      value: ''
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    check: false
  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleChange() {
      let { check } = this.data
      check = !check
      this.setData({
        check
      })
      this.triggerEvent('getCheck', this.data.check)
    },
    handleChooseAddress() {
      this.triggerEvent('chooseAddress')
    },
    pay() {
      this.triggerEvent('pay')
    }
  }
})
